package util;

import java.util.Comparator;
import java.util.Map;

public class ValueComparable implements Comparator<Triplet<Candle, Candle, Candle>> {

	@Override
	public int compare(Triplet<Candle, Candle, Candle> t1, Triplet<Candle, Candle, Candle> t2) {
    	Candle c1 = (Candle) t1.getC();
    	Candle c2 = (Candle) t2.getC();
    	
    	Float v1 = c1.getVolume() * c1.getPriceLow();
    	Float v2 = c2.getVolume() * c2.getPriceLow();
    	
        return -v1.compareTo(v2);
	}
}
